﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data.SqlClient;

namespace FYPHP
{
    public partial class VirtualAgreement : System.Web.UI.Page
    {
        SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["fyphp"].ConnectionString);

        protected void Page_Load(object sender, EventArgs e)
        {
            conn.Open();
            SqlCommand cmdSearch = new SqlCommand("SELECT ch_price FROM Charges WHERE ch_type='Virtual'", conn);
            double price = Convert.ToDouble(cmdSearch.ExecuteScalar());
            conn.Close();
            Label1.Text = "<input type='hidden' name='amount' value='"+ price +"' />";
        }

    }
}